package whf.framework.report.export;

import java.util.Enumeration;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import whf.framework.util.Utils;

/**
 * @author wanghaifeng
 * @create Dec 14, 2006 4:31:03 PM
 * 
 */
public class Parameters {
	private Map<String, String> params = Utils.newHashMap();

	public Parameters(HttpServletRequest request){
		Enumeration paramNames = request.getParameterNames();
		while (paramNames.hasMoreElements()) {
			String name = (String) paramNames.nextElement();
			String value = request.getParameter(name);
			params.put(name, value);
		}
	}

	public void addParameter(String name, String value) {
		params.put(name, value);
	}

	public String getParameter(String name) {
		return (String) params.get(name);
	}
}